package com.touchyourheart.model.bean;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ForeignKey;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "hand_made_material")
public class HandMadeMaterial implements Serializable {

  private static final long serialVersionUID = 5312162598780075282L;

  @Id
  @GeneratedValue(strategy = GenerationType.AUTO)
  private long id;

  @Column(name = "name", nullable = false, length = 64)
  private String name;

  @Column(name = "amount", nullable = false)
  private String amount;

  @ManyToOne
  @JoinColumn(name = "hand_made_id_fk", foreignKey = @ForeignKey(name = "hmma_hand_made_id_fk"))
  private HandMade handMade;

  public long getId() {
    return id;
  }

  public void setId(long id) {
    this.id = id;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getAmount() {
    return amount;
  }

  public void setAmount(String amount) {
    this.amount = amount;
  }

  public HandMade getHandMade() {
    return handMade;
  }

  public void setHandMade(HandMade handMade) {
    this.handMade = handMade;
  }

}
